<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; Charset=gb2312">
    <meta http-equiv="Content-Language" content="zh-CN">
    <title>首页</title>
    <style>
        a{text-decoration:none}
        a:hover{text-decoration:none}
    </style>
    <script>
        $("ul.layui-fixbar").css("display","none");
    </script>
</head>
<body>
    <nav class="blog-nav layui-header">
        <div class="blog-container">
            <!-- QQ互联登陆 -->
            <div class="blog-user">
                {% if user.is_authenticated %}
                    <!-- 如果用户已登录，则显示用户名下拉框  -->
                <ul class="layui-nav">
                    <li class="layui-nav-item">
                            <a href="javascript:"> {{ user.username }}</a>
                        <dl class="layui-nav-child" id="cnav">
                            <dd><a href="{% url 'users:profile' user.id %}" target="iframe">个人信息</a></dd>
                            <dd><a href="{% url 'article:article_create' %}" target="iframe">新建文章</a></dd>
                            <dd><a href="{% url 'article:article_admin'%}" target="iframe">我的文章</a></dd>
                            <dd><a href="{% url 'users:logout' %}">退出登录</a></dd>
                        </dl>
                    </li>
                </ul>
                    <!-- 如果用户未登录，则显示登录  -->
                {% else %}
                    <li class="layui-nav-item">
                    <a href="{% url 'users:login' %}">登录</a>
                    </li>
                {% endif %}
            </div>

            <!-- 川塔logo -->
            <a class="blog-logo" href="{% url 'common:home' %}">

                {% for blog in blogs %}
                    {{ blog.site_name }}
                    <img src="{{blog.site_logo.url}}" alt="{{ blog.site_name }}">
                {% endfor %}
            </a>


            <!-- 导航菜单 -->

            <ul class="layui-nav" lay-filter="docDemoTabBrief" id="nav">
                <li class="layui-nav-item" >
                    <a href="{% url 'common:home' %}"><i class="fa fa-home fa-fw"></i>&nbsp;网站首页</a>
                </li>
                <li class="layui-nav-item">
                    <a href="{% url 'article:article_list'%}"><i class="fa fa-file-text fa-fw"></i>&nbsp;文章专栏</a>
                </li>
                <li class="layui-nav-item">
                    <a href="{% url 'common:resource'%}"><i class="fa fa-tags fa-fw"></i>&nbsp;资源分享</a>
                </li>
                <li class="layui-nav-item">
                    <a href="{% url 'common:timeline'%}"><i class="fa fa-hourglass-half fa-fw"></i>&nbsp;展示台</a>
                    <dl class="layui-nav-child" id="cnav">
                        <dd><a href="{% url 'common:timeline' %}">时光树</a></dd>
                        <dd> <a href="{% url 'common:picturewall'%}">照片墙 </a></dd>
                        <dd> <a href="{% url 'common:musicland' %}">音乐天地</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="{% url 'common:about'%}"><i class="fa fa-info fa-fw"></i>&nbsp;关于本站</a>
                </li>
            </ul>
            <!-- 手机和平板的导航开关 -->
            <a class="blog-navicon" href="javascript:">
                <i class="fa fa-navicon"></i>
            </a>
        </div>
    </nav>
</body>
</html>